package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/09/09 11:03
 **/
public class Day7_1_Num1598_MinOperations {
    class Solution {
        public int minOperations(String[] logs) {
            int step = 0;
            for(String str : logs){
                if(str.equals("../")){
                    if(step == 0) continue;
                    else step--;
                }
                else if(str.equals("./")) continue;
                else step++;
            }
            return step;
        }
    }
}